package net.wofly.sale.commodity.service.impl;

import java.util.List;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import net.wofly.sale.commodity.repository.CommodityParamRepository;
import net.wofly.sale.commodity.domain.CommodityParam;
import net.wofly.sale.commodity.service.ICommodityParamService;

@Service("iCommodityParamService")
@Transactional
public class CommodityParamServiceImpl implements ICommodityParamService {

	@Autowired
	CommodityParamRepository commodityParamRepository;

	@Override
	public CommodityParam save(CommodityParam entity) {
		return commodityParamRepository.save(entity);
	}

	@Override
	public void delete(CommodityParam entity) {
		commodityParamRepository.delete(entity);
	}

	@Override
	public void delete(String key) {
		commodityParamRepository.delete(key);
	}

	@Override
	public CommodityParam findOne(String key) {
		return commodityParamRepository.findOne(key);
	}

	@Override
	public List<CommodityParam> save(List<CommodityParam> entityList) {
		return (List<CommodityParam>) commodityParamRepository.save(entityList);
	}
}
